//入口文件
import Vue from 'vue'

//1.1导入路由的包
import VueRouter from 'vue-router'
//1.2安装路由
Vue.use(VueRouter)
//1.3导入自定义的router.js路由模块文件
import router from './router.js'


// //按需导入mint-ui的组件
// import {Header} from 'mint-ui'
// Vue.component(Header.name,Header)
//mint-ui全局导入
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'

Vue.use(MintUI)



//导入mui样式
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
import app from './App.vue'


//定义全局过滤器
//调用时间插件
import moment from 'moment'

Vue.filter('dateFormat', function (dataStr, pattern = "YYYY-MM-DD HH:mm:ss") {
        return moment(dataStr).format(pattern)
})





//2.1导入vue-source
import VueResource from 'vue-resource'
//2.2安装vue-resource
Vue.use(VueResource)
//设置请求的根路径
Vue.http.options.root = 'http://www.liulongbin.top:3005';




var vm = new Vue({
        el: "#app",
        render: c => c(app),
        router//1.4挂载路由对象到vm上
})